package com.cyt.work.antiepidemic.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * e门通-社区信息实体类
 *
 * @author rong yuan
 * @date 2020-2-12 1:46:52
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_antiepidemic_community")
public class AntiepidemicCommunity implements Serializable {

    /**
     * 主键ID
     */
    @Id
    private String id;

    /**
     * 应用ID
     */
    @Column(name = "apply_id")
    private String applyId;

    /**
     * 省国标码
     */
    @Column(name = "province_code")
    private String provinceCode;

    /**
     * 市国标码
     */
    @Column(name = "city_code")
    private String cityCode;

    /**
     * 区国标码
     */
    @Column(name = "region_code")
    private String regionCode;

    /**
     * 社区名称
     */
    @Column(name = "building_name")
    private String buildingName;

    /**
     * 最大出行次数：1/1-每户一天一次；2/1-每户两天一次
     */
    @Column(name = "max_trip_times")
    private String maxTripTimes;

    /**
     * 社区类型1=小区2=写字楼，code
     * community_type
     */
    @Column(name = "community_type")
    private String communityType;

    /**
     * 是否需要审核1=不需要2=需要
     * community_is_check
     */
    @Column(name = "check_type")
    private String checkType;

    /**
     * 上班时间起始默认07:00:00
     */
    @Column(name = "go_start_work")
    private String goStartWork;

    /**
     * 上班时间结束默认09:00:00
     */
    @Column(name = "go_end_work")
    private String goEndWork;

    /**
     * 下班时间起始默认17:00:00
     */
    @Column(name = "off_start_work")
    private String offStartWork;

    /**
     * 下班时间结束默认19:00:00
     */
    @Column(name = "off_end_work")
    private String offEndWork;

    /**
     * 删除标志：0-未删除；1-已删除
     */
    @Column(name = "remove_tag")
    private String removeTag;

    /**
     * 创建人ID
     */
    @Column(name = "create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新人ID
     */
    @Column(name = "update_user")
    private String updateUser;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 创建对象
     *
     * @param sysUser 当前用户信息
     * @author rong yuan
     * @date 2020-2-12 1:46:52
     */
    public AntiepidemicCommunity(SysUser sysUser) {
        this.id = BaseUtil.uId();
        this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
        this.createTime = new Date();
        this.createUser = sysUser.getId();
        this.updateTime = new Date();
        this.updateUser = sysUser.getId();
    }
}